package com.xw.functionService.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.xw.functionService.mapper.NoteTakingMapper;
import com.xw.functionService.model.NoteTaking;
import com.xw.functionService.service.NoteTakingService;
/**
 * 随手记接口实现类
 * @author xiaoshengda
 *
 * @date 创建时间：2018年4月5日 下午12:09:56
 */
@Service
public class NoteTakingServiceImpl implements NoteTakingService {
	@Autowired
	private NoteTakingMapper noteTakingMapper;

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void del(Long noteTakingId) {
		this.noteTakingMapper.del(noteTakingId);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void insert(NoteTaking noteTaking) {
		this.noteTakingMapper.insert(noteTaking);
	}

	@Override
	public NoteTaking loadById(Long noteTakingId) {
		return this.noteTakingMapper.loadById(noteTakingId);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public void update(NoteTaking noteTaking) {
		this.noteTakingMapper.update(noteTaking);
	}

}
